﻿using Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IService
{
    public interface ITypeOfGoodsService
    {
        /// <summary>
        /// 前端列表展示（可带参数进行查询）
        /// </summary>
        /// <param name="goodsType"></param>
        /// <param name="status"></param>
        /// <param name="operator"></param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        Task<List<WMSBasicTypeOfGoods>> GetGoodsTypeTreeAsync(string goodsType = null, string status = null, string @operator = null, DateTime? startTime = null, DateTime? endTime = null);

        Task<List<WMSBasicTypeOfGoods>> GetParentTypeOptionsAsync();

        Task AddTypesAsync(AddWMSBasicTypeOfGoods model);
        Task<AddWMSBasicTypeOfGoods> SelectTypeAsync(string product_type_code);

        Task DeleteTypesAsync(string product_type_code);
        Task UpdateTypesAsync(AddWMSBasicTypeOfGoods model);

        Task<List<WMSBasicTypeOfGoods>> GetGoodsTypeTreeAsync();
        /// <summary>
        /// 根据类型ID获取类型名称
        /// </summary>
        /// <param name="typeId">货品类型ID</param>
        Task<string> GetTypeNameByIdAsync(int typeId);
        /// <summary>
        /// 批量根据类型ID获取类型名称（新增）
        /// </summary>
        /// <param name="typeIds">类型ID列表</param>
        /// <returns>键：类型ID，值：类型名称</returns>
        Task<Dictionary<int, string>> GetTypeNamesByIdsAsync(List<int> typeIds);
    }
}
